package com.yrot.admin.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yrot.admin.entity.SysExpert;
import com.yrot.admin.mapper.SysExpertMapper;
import com.yrot.admin.service.ISysExpertService;
import org.springframework.stereotype.Service;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author hemin
 * @since 2019-04-02
 */
@Service
public class SysExpertServiceImpl extends ServiceImpl<SysExpertMapper, SysExpert> implements ISysExpertService {

    @Override
    public SysExpert findByUserName(String userName) {
        QueryWrapper<SysExpert> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("expert_username",userName);
        return getOne(queryWrapper);
    }
}
